package com.atguigu.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * Date:2020/9/15
 * Author:ybc
 * Description:
 */

public class FirstFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("FirstFilter初始化");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("FirstFilter执行过滤");
        //放行
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {
        System.out.println("FirstFilter销毁");
    }
}
